package com.example.demo.mapper;

import com.example.demo.entity.VideoComm;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class VideoCommMapper implements RowMapper<VideoComm> {
    @Override
    public VideoComm mapRow(ResultSet resultSet, int i) throws SQLException {
        VideoComm videoComm = new VideoComm();
        videoComm.setId(resultSet.getInt("OBJID"));
        videoComm.setNickName(resultSet.getString("NICKNAME"));
        videoComm.setVideoID(resultSet.getInt("VIDEOID"));
        videoComm.setAvatarUrl(resultSet.getString("AVATARURL"));
        videoComm.setCity(resultSet.getString("CITY"));
        videoComm.setProvince(resultSet.getString("PROVINCE"));
        videoComm.setGender(resultSet.getString("GENDER"));
        videoComm.setCommTime(resultSet.getString("COMMTIME"));
        videoComm.setComm(resultSet.getString("COMM"));
        return videoComm;
    }
}
